package ex109;

public class Main {
    public static void main(String[] args) {
        CabinetProblem problem = new CabinetProblem(3000000);
        long t1 = System.currentTimeMillis();
        for (int id : problem.getCabinetsOpened()) {
            System.out.print(id + " ");
        }
        long t2 = System.currentTimeMillis();
        System.out.println();
        long t3 = System.currentTimeMillis();
        for (int id : problem.getCabinetsOpenedFast()) {
            System.out.print(id + " ");
        }
        long t4 = System.currentTimeMillis();
        System.out.println();
        System.out.println(t2 - t1);
        System.out.println(t4 - t3);
    }
}
